package com.jvm;

import org.openjdk.jol.info.ClassLayout;

/**
 * @Author: tgy
 * @Date: 2020-11-17 11:47
 */
public class StringTableDemo02 {

    public static void main(String[] args) {

        String a1 = "a";
        String a2 = "b";

        String a3 = a1 + a2;

        ClassLayout.parseInstance(a3).toPrintable();
        String a4 = a3.intern();
        ClassLayout.parseInstance(a3).toPrintable();
        System.out.println(a4 == a3);

    }
}
